1. Field of the Invention
The present invention generally relates to an improved data processing system. More particularly, the present invention relates to a method and apparatus for processing JSP® pages for an application server.
2. Description of the Related Art
The Internet has become a cultural fixture as a source of both information and entertainment. Many businesses are creating Internet sites as an integral part of their marketing efforts, informing consumers of the products or services offered by the business or providing other information seeking to engender brand loyalty. Many federal, state, and local government agencies are also employing Internet sites for informational purposes, particularly agencies which must interact with virtually all segments of society such as the Internal Revenue Service and secretaries of state. Providing informational guides and/or searchable databases of online public records may reduce operating costs. Further, the Internet is becoming increasingly popular as a medium for commercial transactions.
The term “Internet” generally refers to the collection of networks and gateways that use the TCP/IP suite of protocols. Currently, the most commonly employed method of transferring data over the Internet is to employ the World Wide Web environment, also called simply “the Web”. Other Internet resources exist for transferring information, such as File Transfer Protocol (FTP), but have not achieved the popularity of the Web. In the Web environment, servers and clients effect data transaction using the Hypertext Transfer Protocol (HTTP), a known protocol for handling the transfer of various data files (e.g., text, still graphic images, audio, motion video, etc.). The information in various data files is formatted for presentation to a user by a standard page description language, the Hypertext Markup Language (HTML). In addition to basic presentation formatting, HTML allows developers to specify “links” to other Web resources identified by a Uniform Resource Locator (URL). A URL is a special syntax identifier defining a communications path to specific information. Each logical block of information accessible to a client, called a “page” or a “Web page”, is identified by a URL. The URL provides a universal, consistent method for finding and accessing this information, not necessarily for the user, but mostly for the user's Web “browser”. A browser is a program capable of submitting a request for information identified by a URL at the client machine. Retrieval of information on the Web is generally accomplished with an HTML-compatible browser.
Web content is often dynamic because of various changes made by developers and other users publishing or making available web content, such as Web pages. Even static pages are occasionally updated. Web servers provide static content and dynamic content to various users. Static content contain data from files stored at a server. Dynamic content is constructed by programs executing at the time a request is made. Dynamic content is often present at a web site in an effort to provide customized pages and updated information to various users that may visit the site. Dynamic content may be provided utilizing JavaServer Pages® (JSP® pages), based on Java® platform technology. Compared to other methods of delivering dynamic content, JSP® pages provide advantages such as separation of dynamic and static contents (i.e., separation of application logic and web page design), which reduces the complexity of web site development and makes the site easier to maintain.
The first invocation of a JSP® page requires several preliminary steps which are performed once for the application server running the JSP® page. First, a temporary servlet source code (JAVA® source code) is created based on the contents of the JSP® page (i.e., filename.jsp file is translated to filename.java file). Second, the servlet source code is compiled into a servlet class file (i.e., filename.java file is translated to filename.class file). These two steps are performed only once until the JSP® page has been changed (i.e., the file containing the page is modified). Third, a bytecode verification is processed against the servlet class file. Fourth, a direct executable is generated for the servlet class file. Lastly, the direct executable is loaded into the Java® virtual machine on the application server. The last three steps are performed once per Java® virtual machine.
Although subsequent invocations of the same JSP® pages are generally fast because these preliminary steps are performed only one time, the first invocation of a JSP® pages may require substantial processing time, resulting in a noticeable delay to the end user. The delay problem is compounded when JSP® pages are written to invoke other JSP® pages, causing the total delay to be the serial sum of the processing time for each JSP® page.
Therefore, there is a need for a method and apparatus for processing JSP® pages for an application server which reduces the delays resulting from a first time invocation of a JSP® page.